from flask import session
from . import news_blue
from flask import render_template
from flask import current_app

@news_blue.route('/')
# 创建试图函数
def index():
    return render_template('news/index.html')

# 网站favicon图标的加载
# １浏览器自动加载，默认会访问ｕｒｌ，以获取图标http://127.0.0.1:5000/favicon.ico
# 定义路由，ｒｏｕｔｅ（./favicon.ico),实现把文件发送给浏览器，找到static/news/favcion.ico文件的路劲
@news_blue.route('/favicon.ico')
def favicon():
    return current_app.send_static_file('news/favicon.ico')

